The present invention relates to a method for controlling congestion from a terminal in a frame relay network, and in particular, to a method for controlling congestion from a frame relay terminal (hereinafter referred as a terminal) connected to a digital network providing a frame relay bearer service, which is called a frame relay network (hereinafter referred as a xe2x80x9cnetworkxe2x80x9d). The terminal may be a terminal device such as a terminal adapter, a communication control device, and a communication protocol conversion device.
This application is based on Japanese Patent Application No. Hei 9-363107, the contents of which are incorporated herein by reference.
In congestion control on a frame relay network, when the network becomes congested, a congestion notification is sent to a terminal, which then restricts data traffic (ITU-T recommendation: Q.922 ISDN data link layer specification for frame mode bearer service).
In one conventional method for providing congestion control in the frame relay network, discarding of data caused by the congestion is avoided to enhance network throughput (Japanese Patent Application, First Publication No. Hei 8-149156), and, in another conventional method, a frame relay communication processing device executes an interrupt to alleviate the congestion (Japanese Patent Application, First Publication No. Hei 8-85337).
In general, there are three types of method for explicitly sending a congestion notification through a network to a terminal:
1) setting to 1 a forward explicit congestion notification (FECN) bit, which is included in a frame transmitted to the terminal,
2) setting to 1 a backward explicit congestion notification (BECN) bit, which is included in a frame transmitted to the terminal, and
3) voluntarily transmitting a consolidated link layer management (CLLM) message to the terminal.
There are two types of method for controlling congestion from the terminal which receives the notification explicitly indicating the congestion in the network:
a) a throughput control method for controlling a quantity of transmitted data during a certain period of time (throughput), and
b) a window control method for altering a transmission window size WS which represents the number of frames transmittable without requesting acknowledgement of receipt from the terminal.
The two congestion control methods are intended to restrict the quantity of transmitted data when the network becomes congested and to restore the quantity of transmitted data after the congestion subsides.
With reference to FIG. 2, the basic steps of the conventional window control method will be explained from the occurrence of the congestion during data transmission from the terminal to the restoring the normal quantity of transmitted data to the normal level after the subsidence of the network congestion.
Before the occurrence of the congestion, the terminal transmits data while maintaining a transmission window size WS at the maximum window size MW (for example, 32) (in step P201). When the network becomes congested (in step P202), the terminal recognizes the congestion by the congestion notification transmitted through the network (in step P203). The terminal, after the recognition of the congestion, reduces the quantity of transmitted data to decrease a load to the network. The reduction is executed by, for example, the following window control process for reducing the transmission window size WS (in step P204).
In case of the congestion notification using a BECN bit, on receipt of a frame with the BECN bit set to 1 (congestion notification frame), the terminal alters the transmission window size WS according to WS=present WSxc3x970.675 (where WSxe2x89xa71). Further, when the stepcount S number of consecutive frames are received with the BECN bits set to 1, the alteration is repeated. The stepcount S indicates the number of frames to be received within twice the length of time of a frame transmission delay from one terminal to another terminal under the maximum throughput.
When the subsidence of the congestion is detected (in step P205), the terminal detects the subsidence by receiving no congestion notification frame (in step P206). On receipt of the congestion subsidence notification through the network, the terminal restores the quantity of the transmitted data to normal. The transmission window size WS is enlarged (in step 207) to the initial maximum transmission window size MW (in step P208) by, for example, the following process.
On receipt of S/2 (half of the stepcount S) consecutive frames with the BECN bits=0, the terminal alters the transmission window size WS according to WS=present WS+1.
In the above-mentioned conventional window control method based on the congestion notification using the BECN bit, when there are few frames traveling in the direction opposite to the congestion, there is a problem in that the terminal cannot sufficiently implement the flow control. For example, when the stepcount S is 100 and there are two frames per second traveling in the direction opposite to the congestion, it takes 50 seconds from the reduction of the transmission window size WS on receipt of the first BECN bit set to 1 until the next reduction of the transmission window size WS. This applies to the avoidance of the congestion, under which it takes 25 seconds to enlarge the transmission window size WS to the next step size. Thus, even though congestion may occur, the transmission window size WS is not reduced immediately, and neither the transmission window size WS is increased immediately after the congestion subsides, resulting in inefficient throughput.
It is therefore an object of the present invention to provide a method for controlling congestion from a terminal in a frame relay network, which can provide efficient window control according to the status of a network irrespective of a quantity of frames traveling in the direction opposite to the congestion.
In order to accomplish the above object, a method for controlling congestion from a terminal in a frame relay network, according to the present invention comprises the step of reducing and increasing a quantity of transmitted data, eliminating the influence of the quantity of data transmitted through the frame relay network. In one aspect of the present invention, a transmission window size is reduced based on a ratio of frames with BECN (backward explicit congestion notification) bits set to frames received in a certain period of time.
In another aspect of the present invention, a method for controlling congestion from a terminal in a frame relay network, comprises the steps of: detecting congestion in the network by receiving a congestion notification frame with a BECN bit=1; reducing a transmission window size based on the ratio of the congestion notification frames with the BECN bits=1 to received frames; enlarging the transmission window size, when the congestion subsides and frames with the BECN=0 in the received frames increase; and stopping the enlargement of the transmission window size when the transmission window size attains the maximum transmission window size.
In another aspect of the present invention, a method for controlling congestion from a terminal in a frame relay network, comprises the steps of: detecting congestion in the network by receiving a congestion notification frame with a BECN bit=1; reducing a transmission window size on receipt of the first congestion notification frame; starting a timer; resetting a frame number counter and a congestion notification frame number counter; determining whether a measurement interval has passed since starting the timer; determining whether a frame is received when the measurement interval has not passed; increasing the frame number counter incrementally when the frame is received; determining whether the BECN bit of the received frame is set to 1; increasing the congestion notification frame number counter incrementally when the BECN bit is set to 1; calculating a ratio by dividing the congestion notification frame number counter by the frame number counter when the measurement interval has passed; determining whether the ratio is positive; reducing the transmission window size based on the ratio when the ratio is positive; determining whether the transmission window size is set to the maximum transmission window size when the ratio is not positive; and enlarging the transmission window size when the transmission window size is not set to the maximum transmission window size.
In the step of reducing a transmission window size on receipt of the first congestion notification frame, the transmission window size WS is altered according to according to WS=present WSxc3x970.675 (where WSxe2x89xa71). In the step of determining whether a measurement interval has passed since starting the timer, the measurement interval is set to twice a length of time from arrival of a normal frame at a remote terminal to reception of a response by a local terminal. In the step of reducing the transmission window size based on the ratio when the ratio is positive, the size is reduced to 0.5 of the present size when the ratio is equal to or more than 0.9, the size is reduced to 0.7 of the present size when the ratio R is under 0.9 and equal to or more than 0.6, the size is reduced to 0.8 of the present size when the ratio R is under 0.6 and equal to or more than 0.3, and the size is reduced to 0.9 of the present size when the ratio R is under 0.3 and more than zero. In the step of determining whether the transmission window size is set to the maximum transmission window size when the ratio is not positive, the maximum transmission window size is set to 32.
In a computer readable medium containing program instructions for controlling congestion from a terminal in a frame relay network, according to the present invention, the program instructions include instructions for performing the step comprising reducing and increasing a quantity of transmitted data, eliminating the influence of the quantity of data transmitted through the frame relay network. The program instructions include instructions for performing the step comprising altering a transmission window size based on a ratio of frames with BECN (backward explicit congestion notification) bits set to frames received in a certain period of time.
In another aspect of a computer readable medium containing program instructions for controlling congestion from a terminal in a frame relay network according to the present invention, the program instructions include instructions for performing the steps comprising: detecting congestion in the network by receiving a congestion notification frame with a BECN bit=1; reducing a transmission window size based on the ratio of the congestion notification frames with the BECN bits=1 to received frames; enlarging the transmission window size, when the congestion subsides and frames with the BECN=0 in the received frames increase; and stopping the enlargement of the transmission window size when the transmission window size attains the maximum transmission window size.
The advantage of the present invention is that the transmission window size can be reduced immediately when the network becomes congested. According to the present invention, the transmission window size can be reduced in accordance with the ratio of the frames with congestion notifications to the total of frames transmitted through the network, thereby enhancing congestion control efficiency.
The second advantage of the present invention is that the quantity of the transmitted data can be increased immediately after the congestion subsides. According to the present invention, the quantity of the transmitted data is increased when no frame with the congestion notification is received during the measurement interval, thereby enhancing data transfer efficiency.